package main

import (
	"fmt"
	"time"
)

func main() {
	// 匿名函数+外部变量=闭包
	for i := 0; i < 5; i++ {
		go func(n int) {
			fmt.Println(n)
		}(i)
	}
	
	time.Sleep(time.Second)
}
